<template>
  <div class="home-page">
    <div class="hero-section">
      <h1>智能写作平台</h1>
      <p class="subtitle">利用 AI 技术，轻松创作高质量内容</p>
      <div class="action-buttons">
        <el-button type="primary" size="large" @click="$router.push('/editor')">开始写作</el-button>
        <el-button size="large" @click="$router.push('/articles')">查看文章</el-button>
      </div>
    </div>

    <div class="features-section">
      <h2 class="section-title">平台特色</h2>
      <div class="features-grid">
        <div class="feature-card">
          <el-icon size="32" color="#409EFF"><Edit /></el-icon>
          <h3>智能写作</h3>
          <p>基于先进的 AI 大模型，帮助您快速创作高质量内容</p>
        </div>
        <div class="feature-card">
          <el-icon size="32" color="#409EFF"><Document /></el-icon>
          <h3>多种文章类型</h3>
          <p>支持博客、新闻、技术文档等多种文章类型的创作</p>
        </div>
        <div class="feature-card">
          <el-icon size="32" color="#409EFF"><Setting /></el-icon>
          <h3>自定义模型</h3>
          <p>可配置多种 AI 模型，满足不同场景的写作需求</p>
        </div>
        <div class="feature-card">
          <el-icon size="32" color="#409EFF"><ChatDotRound /></el-icon>
          <h3>提示词模板</h3>
          <p>丰富的提示词模板，让 AI 更好地理解您的写作意图</p>
        </div>
      </div>
    </div>

    <div class="getting-started-section">
      <h2 class="section-title">快速开始</h2>
      <el-steps :active="1" finish-status="success">
        <el-step title="创建文章" description='点击"开始写作"按钮，创建新文章'></el-step>
        <el-step title="设置参数" description="选择文章主题、风格和长度等参数"></el-step>
        <el-step title="生成内容" description="AI 将根据您的设置生成文章内容"></el-step>
        <el-step title="编辑完善" description="根据需要编辑和完善文章内容"></el-step>
      </el-steps>
    </div>
  </div>
</template>

<script setup>
import { Edit, Document, Setting, ChatDotRound } from '@element-plus/icons-vue'
</script>

<style scoped>
.home-page {
  padding: 24px;
}

.hero-section {
  text-align: center;
  padding: 60px 0;
  background-color: #f5f7fa;
  border-radius: 8px;
  margin-bottom: 40px;
}

.hero-section h1 {
  font-size: 36px;
  color: #303133;
  margin-bottom: 16px;
}

.subtitle {
  font-size: 18px;
  color: #606266;
  margin-bottom: 32px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
  color: #303133;
}

.features-section {
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 24px;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  text-align: center;
}

.feature-card h3 {
  margin: 16px 0;
  font-size: 18px;
  color: #303133;
}

.feature-card p {
  color: #606266;
  line-height: 1.6;
}

.getting-started-section {
  margin-bottom: 60px;
  padding: 40px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
</style> 